package xby.study.proxy;

import java.lang.reflect.Proxy;

public class Test {

    public static void main(String[] args) {
        Game game = (Game) Proxy.newProxyInstance(
                MyInvocationHandler.class.getClassLoader(),
                new Class<?>[]{Game.class},
                new MyInvocationHandler( new GameImpl() )
        );
        game.playGame();
    }


}
